﻿<%@ Page Title="Tax Master" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="TaxMaster.aspx.cs" Inherits="TestJQGrid.Tax_Section.TaxMaster" %>

<%@ Register Assembly="Trirand.Web" Namespace="Trirand.Web.UI.WebControls" TagPrefix="Trirand" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/redmond/jquery-ui-1.8.2.custom.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqgrid.css" />
    <!-- jQuery runtime minified -->
    <script src="/js/jquery-1.4.4.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="/js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="/js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="/js/trirand/jquery.jqDatePicker.min.js" type="text/javascript"></script>
    <script src="../js/validator.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" media="all" href="../jsdatepick-calendar/jsDatePick_ltr.min.css" />
    <script type="text/javascript" src="../jsdatepick-calendar/jsDatePick.min.1.3.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table border="1" width="100%">
    <tr>
        <td colspan="2" align="center"><asp:Label ID="pageLable" runat="server" Text="Tax Master" Font-Size="Medium"></asp:Label></td>
    </tr>
        <tr>
            <td rowspan="4" style="width: 20%;" align="left" valign="top">
                <asp:ListBox ID="LBStates" runat="server" Width="100%" DataTextField="Value" DataValueField="ColumnName"
                    AutoPostBack="True" OnSelectedIndexChanged="LBStates_SelectedIndexChanged" Rows="20">
                </asp:ListBox>
            </td>
            <td align="left" style="height: 74%; width: 80%;" valign="top">
            <div id="div_left" style="width:96%;float:left;">

            <%--<div id="div_date" style="padding:10px;margin-left:10%;">
                    <asp:Label ID="LabelFrom" runat="server" Text="From Date" Width="100px"></asp:Label>
                    <asp:TextBox ID="TBFrom" runat="server" Width="120px" onClick="return getDate('MainContent_TBFrom');"></asp:TextBox>
                    <asp:Label ID="LabelDateTo" runat="server" Text="TO" Width="20px"></asp:Label>
                    <asp:TextBox ID="TBToDate" runat="server" Width="120px" onClick="return getDate('MainContent_TBToDate');"></asp:TextBox>

                    <Trirand:JQDatePicker ID="JQDatePicker1" runat="server" DateFormat="dd/MM/yyyy" ChangeYear="true" ChangeMonth="true" />
                    <Trirand:JQDatePicker ID="JQDatePicker2" runat="server" DateFormat="dd/MM/yyyy" ChangeYear="true" ChangeMonth="true" />
            </div>--%>
                <Trirand:JQGrid runat="server" ID="JQGrid1" Height="300px" Width="700px" AutoWidth="true"
                    OnRowAdding="JQGrid1_OnRowAdding" OnRowEditing="JQGrid1_OnRowEditing" OnRowDeleting="JQGrid1_RowDeleting"
                    OnDataRequesting="JQGrid1_DataRequesting" OnRowSelecting="JQGrid1_RowSelecting">
                    <Columns>
                        <Trirand:JQGridColumn DataField="EntryId" PrimaryKey="True" Visible="false" />
                        <Trirand:JQGridColumn DataField="TaxType" Editable="true" EditType="DropDown" EditorControlID="DDTax" HeaderText="Tax Type" />
                        <Trirand:JQGridColumn DataField="Priority" Editable="true" EditType="DropDown" EditorControlID="DDPriority" />
                        <Trirand:JQGridColumn DataField="TaxPercent" Editable="true" HeaderText="Tax Percent (%)">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                                <Trirand:NumberValidator />
                                <Trirand:MinValueValidator MinValue="0" />
                                <Trirand:MaxValueValidator MaxValue="100" />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="TaxRange" Editable="true" HeaderText="Tax Range">
                            <EditClientSideValidators>
                                <Trirand:MinValueValidator MinValue="0" />
                                <Trirand:RequiredValidator />
                                <Trirand:NumberValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="Applicable" Editable="true" EditType="DropDown" EditorControlID="DDApplicable" HeaderText="Applicable On">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="FromDate" Visible="true" Editable="true" DataType="System.DateTime"
                            DataFormatString="{0:dd/MM/yyyy}" EditType="DatePicker" EditorControlID="datepicker" HeaderText="From Date">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />                                
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="ToDate" Visible="true" Editable="true" DataType="System.DateTime"
                            DataFormatString="{0:dd/MM/yyyy}" EditType="DatePicker" EditorControlID="datepicker" HeaderText="To Date">
                            <EditClientSideValidators>
                                <Trirand:RequiredValidator />
                            </EditClientSideValidators>
                        </Trirand:JQGridColumn>
                        <Trirand:JQGridColumn DataField="CreatedBy" Visible="false" />
                        <Trirand:JQGridColumn DataField="CreatedOn" Visible="false" DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy}" />
                    </Columns>
                    <ToolBarSettings ShowAddButton="true" ShowEditButton="true" ShowDeleteButton="true"
                        ShowRefreshButton="True" ShowSearchButton="True" ShowViewRowDetailsButton="True" />
                    <EditDialogSettings CloseAfterEditing="True" />
                    <AddDialogSettings CloseAfterAdding="true" />
                    <SearchDialogSettings MultipleSearch="true" />
                    <AppearanceSettings ShrinkToFit="false" />
                </Trirand:JQGrid>

                <asp:DropDownList ID="DDTax" runat="server" DataTextField="Value" DataValueField="ColumnName" />
                <Trirand:JQDatePicker ID="datepicker" runat="server" DateFormat="dd/MM/yyyy" DisplayMode="ControlEditor"
                    ChangeYear="true" ChangeMonth="true" />
                <asp:DropDownList ID="DDApplicable" runat="server">
                    <asp:ListItem Text="Gross" Selected="True" Value="Gross"></asp:ListItem>
                    <asp:ListItem Text="Taxable" Value="Taxable" ></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="DDPriority" runat="server"></asp:DropDownList>
                
            </div>
            <div id="div_right" style="width:04%;float:right;v-align:middle;margin-top:15%;">
                <asp:ImageButton ImageAlign="Middle" ID="IBUp" runat="server" BorderStyle="Solid" Height="20px" ImageUrl="~/Image/arrow-up.jpg" Width="20px" OnClick="IBUp_Click" /><br /><br /><br />
                <asp:ImageButton ID="IBDown" ImageAlign="Middle" runat="server" BorderStyle="Solid" Height="20px" ImageUrl="~/Image/arrow-down.jpg" Width="20px" OnClick="IBDown_Click" />
            </div>                
            </td>
        </tr>
    </table>
</asp:Content>
